import request from '@/utils/request'

// export const getEnterAPI = (data) => {
//   return request({ url: '/park/enterprise', params: { data }})
// } /park/enterprise/{id}

export const getEnterAPI = (params) => {
  return request('/park/enterprise', { params })
}

export const getContactAPI = (id) => {
  return request({ url: '/park/enterprise/rent/' + id })
}

export const addEnterAPI = (params) => {
  return request({
    url: '/park/enterprise',
    method: 'post',
    params
  })
}
export const getDetailAPI = (id) => {
  return request({
    url: '/park/enterprise/' + id
  })
}
export const delEnterAPI = (id) => {
  return request({
    url: '/park/enterprise/' + id,
    method: 'delete'
  })
}
export const getRentAPI = (id) => {
  return request({
    url: '/park/enterprise/rent/' + id// https://api-hmzs.itheima.net/v1/park/enterprise
  })
}

export const getRentListAPI = (data) => {
  return request({
    url: '/park/enterprise/rent',
    method: 'post',
    data
  })
}
export const updateRentAPI = (id) => {
  return request({
    url: '/park/enterprise/rent/' + id,
    method: 'put'
  })
}

export const delRentAPI = (id) => {
  return request({
    url: '/park/enterprise/rent/' + id,
    method: 'delete'
  })
}
